﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FEM.Result;

namespace PBSD_Development
{
    /// <summary>
    /// 节点
    /// </summary>
    public class NodeObj
    {
        /// <summary>
        /// 节点对象
        /// </summary>
        private Node node { set; get; }

        /// <summary>
        /// 节点编号
        /// </summary>
        public int ID
        {
            get
            {
                return this.node.ID;
            }
        }

        /// <summary>
        /// X坐标
        /// </summary>
        public double X
        {
            get
            {
                return this.node.X;
            }
        }

        /// <summary>
        /// Y坐标
        /// </summary>
        public double Y
        {
            get
            {
                return this.node.Y;
            }
        }

        /// <summary>
        /// Z坐标
        /// </summary>
        public double Z
        {
            get
            {
                return this.node.Z;
            }
        }

        /// <summary>
        /// 塔楼序号
        /// </summary>
        public int TowerIndex
        {
            get
            {
                return this.node.Storey.TowerIndex;
            }
        }

        /// <summary>
        /// 楼层序号
        /// </summary>
        public int StoreyIndex
        {
            get
            {
                return this.node.Storey.StoreyIndex;
            }
        }

        /// <summary>
        /// 获得节点距离
        /// </summary>
        /// <returns></returns>
        public double GetDistance(NodeObj nodeJ)
        {
            return this.node.GetDistance(nodeJ.node);
        }

        /// <summary>
        /// 空的构造函数
        /// </summary>
        public NodeObj()
        {

        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="node"></param>
        public NodeObj(Node node)
        {
            this.node = node;
        }
    }
}
